package com.starry.designPatterns.creatation.builder;

/**
 * @Author Francis
 * @Date 2022-08-31 23:30
 **/
public class MainTest {

    public static void main(String[] args) {

        XiaoMiBuilder xiaoMiBuilder = new XiaoMiBuilder();
        //定制建造
/*        xiaoMiBuilder.customMem("12G");
        xiaoMiBuilder.customCam("4000MP");
        xiaoMiBuilder.customCpu("骁龙888");
        xiaoMiBuilder.customDisk("128G");*/

        //链式建造者
        Phone product= XiaoMiBuilder.builder()
                .customDisk("128G").customCam("4800MP")
                .customMem("12G").customCpu("骁龙888")
                .getProduct();



//        Phone product = xiaoMiBuilder.getProduct();
        System.out.println(product);

    }
}
